During data transmission, as communications technologies are continuously improved, requirements for data transmission rates and data transmission capacities are also increased accordingly, and a millimeter wave (that is, an electromagnetic wave with a wavelength of 1 millimeter to 10 millimeters) has been gradually applied to the field of communications technologies. In a process of performing communication by using a millimeter wave, because a signal of the millimeter wave has a relatively large loss during transmission, an antenna on a base station side and an antenna on a terminal side need to provide a relatively high gain to compensate for the loss of the signal of the millimeter wave during transmission, so as to achieve an effect of high-quality communication. A gain refers to a ratio of a power density of a signal generated by a practical antenna to a power density of a signal generated by an ideal radiating element at a same point in space at a same input power.
In the prior art, in a process of performing communication by using the millimeter wave, omnidirectional beam coverage is usually implemented by respectively using a broadside antenna and an end-fire antenna to cover different spatial areas of an electronic device. However, in a process of implementing omnidirectional coverage of a millimeter wave by using a broadside antenna and an end-fire antenna, a broadside antenna array and an end-fire antenna array that are distributed on a terminal device separately and independently implement coverage of a beam in a corresponding direction, and a form of an antenna array cannot be changed once the antenna array is configured to be in a broadside operating state or an end-fire operating state. Therefore, a direction of a beam formed by the antenna array is fixed, and a signal of an antenna array unit has a relatively high gain only when a location of a peer device is within coverage of the beam formed by the antenna array. However, the location of the peer device is unfixed, and when the location of the peer device changes and the location of the peer device is not within coverage of the beam formed by the antenna array, the antenna array unit has a relatively low signal gain. Antenna array units in other directions are not effectively utilized except the antenna array unit pointing to the peer device, leading to low utilization of the antenna array units.